package bz.ziro.kanbe.controller.mng.listdata;

import java.util.logging.Logger;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.datastore.Datastore;

import com.google.appengine.api.datastore.Key;

import bz.ziro.kanbe.util.KeyFactory;

/**
 * リストデータ削除
 * @author Administrator
 */
public class DeleteController extends Controller {

    @SuppressWarnings("unused")
    private static final Logger logger = Logger.getLogger(DeleteController.class.getName());

    @Override
    public Navigation run() {
        String listKeyBuf = param("listKey");
        //追加する
        String keyBuf = param("listDataKey");
        Key key = KeyFactory.createListDataKey(Long.valueOf(listKeyBuf), Long.valueOf(keyBuf));
        Datastore.delete(key);
        return null;
    }
}
